/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "con_estadocabecera")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ConEstadoCabecera.findAll", query = "SELECT s FROM ConEstadoCabecera s"),
    @NamedQuery(name = "ConEstadoCabecera.findByconCodigoEstCab", query = "SELECT s FROM ConEstadoCabecera s WHERE s.conCodigoEstCab = :conCodigoEstCab"),
    @NamedQuery(name = "ConEstadoCabecera.findByconNombreEstCab", query = "SELECT s FROM ConEstadoCabecera s WHERE s.conNombreEstCab = :conNombreEstCab")})
public class ConEstadoCabecera implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CON_CODIGO_ESTCAB")
    private String conCodigoEstCab;
    @Size(max = 30)
    @Column(name = "CON_NOMBRE_ESTCAB")
    private String conNombreEstCab;
    
    
    public ConEstadoCabecera() {
    }

    public ConEstadoCabecera(String conCodigoEstCab) {
        this.conCodigoEstCab = conCodigoEstCab;
    }

    public String getConCodigoEstCab() {
        return conCodigoEstCab;
    }

    public void setConCodigoEstCab(String conCodigoEstCab) {
        this.conCodigoEstCab = conCodigoEstCab;
    }

    public String getConNombreEstCab() {
        return conNombreEstCab;
    }

    public void setConNombreEstCab(String conNombreEstCab) {
        this.conNombreEstCab = conNombreEstCab;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (conCodigoEstCab != null ? conCodigoEstCab.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ConEstadoCabecera)) {
            return false;
        }
        ConEstadoCabecera other = (ConEstadoCabecera) object;
        if ((this.conCodigoEstCab == null && other.conCodigoEstCab != null) || (this.conCodigoEstCab != null && !this.conCodigoEstCab.equals(other.conCodigoEstCab))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.ConEstadoCabecera[ conCodigoEstCab=" + conCodigoEstCab + " ]";
    }
    
}
